package com.avu.tp.assign2.question3.lsp.comforms;

/**
 *
 * @author Malotana
 */
public class CurrentAccount {

    private double balance;
    private int period;

    public CurrentAccount(double balance, int period) {
        this.balance = balance;
        this.period = period;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public int getPeriod() {
        return period;
    }

    public void setPeriod(int period) {
        this.period = period;
    }

    public boolean openAccount(double balance) {
        this.setBalance(balance);
        return true;
    }

    public boolean closeAccount() {
        if (getBalance() > 0) {
            return true;
        } else {
            return false;
        }
    }
}
